package modelo.reglas.composite.inner;

import modelo.Producto;
import modelo.OrdenDeCompra;
import modelo.reglas.ISpecification;


public class InnerSpecificationFactory {

	public static ISpecification build(InnerSpecification type,String leftValue, String rightValue){
		
		switch (type) {
		case EQUALS:
				return new FieldValueSpecification(leftValue, rightValue, Producto.class);
		case RANGE:
				return new RangeSpecification(leftValue, rightValue);
                case DOTS:
                                return new FieldValueSpecification(leftValue, rightValue, OrdenDeCompra.class);
		}
		return null;
	}
}
